﻿
Partial Class WebForm_ManageBulletin
    Inherits My.MyPage

    Protected Sub SearchBulletin1_Loaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchBulletin1.Loaded
        Me.SearchBulletin1.ClearField()
        Me.SearchBulletin1.BindGV()
    End Sub

    Protected Sub lknAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lknAdd.Click
        Me.InitDataForAdd()
    End Sub

    Protected Sub SearchBulletin1_Updating(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchBulletin1.Updating
        Me.InitDataForUpdate()
    End Sub

    Protected Sub AddBulletin1_Saved(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddBulletin1.Saved
        Me.SearchBulletin1.ClearField()
        Me.InitDataForSearch()
    End Sub
    Protected Sub AddBulletin1_Canceled(ByVal source As Object, ByVal e As System.EventArgs) Handles AddBulletin1.Canceled
        Me.InitDataForSearch()
    End Sub
End Class

Partial Class WebForm_ManageBulletin
    Private Sub InitDataForAdd()
        Me.mvList.SetActiveView(Me.vwAdd)
        Me.AddBulletin1.InitData()
    End Sub


    Private Sub InitDataForUpdate()
        Me.mvList.SetActiveView(Me.vwAdd)
        Me.AddBulletin1.InitData(Me.SearchBulletin1.SelectedBulletinID)
    End Sub

    Private Sub InitDataForSearch()
        Me.mvList.SetActiveView(Me.vwSearch)
        Me.SearchBulletin1.BindGV()
    End Sub

End Class
